package com.ruoyi.system.service.zhaungxiuservice.provincesService.impl;

import com.ruoyi.system.domain.zhuangxiumain.provinces.City;
import com.ruoyi.system.domain.zhuangxiumain.provinces.Province;
import com.ruoyi.system.domain.zhuangxiumain.provinces.Town;
import com.ruoyi.system.mapper.zhuangxiumapper.provincesMapper.CityshiMapper;
import com.ruoyi.system.mapper.zhuangxiumapper.provincesMapper.ProvinceshenMapper;
import com.ruoyi.system.mapper.zhuangxiumapper.provincesMapper.TownxianMapper;
import com.ruoyi.system.service.zhaungxiuservice.provincesService.ProvinceService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ProvinceServiceImpl implements ProvinceService {

   @Autowired
   private CityshiMapper cityshiMapper;

   @Autowired
    private ProvinceshenMapper provinceshenMapper;

   @Autowired
   private TownxianMapper townxianMapper;

    @Override
    public List<Town> findAllTown(String cityCode) {
        return townxianMapper.findAll(cityCode);
    }

    @Override
    public List<Province> findAllProvince() {
        return provinceshenMapper.findAll();
    }

    @Override
    public List<City> findAllCity(String provinceCode) {
        return cityshiMapper.findAll(provinceCode);
    }
}
